//
//  HRZAddressItem.m
//  EMarket
//
//  Created by 石头 on 2018/5/16.
//  Copyright © 2018年 好日子. All rights reserved.
//

#import "HRZAddressItem.h"
#import "HRZSpeedy.h"

@implementation HRZAddressItem

static CGSize extracted(HRZAddressItem *object) {
    return [HRZSpeedy hrz_calculateTextSizeWithText:[NSString stringWithFormat:@"%@ %@", object->_chooseAdress, object->_userAdress] WithTextFont:14 WithMaxW:kScreenWidth - 24];
}

static CGSize HRZAddressItemSize(HRZAddressItem *object) {
    return extracted(object);
}

- (CGFloat)cellHeight {
    if (_cellHeight) {
        return _cellHeight;
    }
    
    CGFloat top = 52;
    CGFloat bottom = 46;
    CGFloat middle = HRZAddressItemSize(self).height;
    return top + middle + bottom;
}

@end
